<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="com.cn.Mapper.userMapper.UserMapper" %>
<%@ page import="com.cn.util.SqlsesstionUtil" %>
<%@ page import="com.cn.entity.user.User" %>
<%@ page import="java.util.List" %>
<%@ page import="com.cn.Mapper.enployeeMapper.EmployeeMapper" %>
<%@ page import="com.cn.entity.enployee.Employee" %>
<%@ page import="com.cn.entity.goods.Goods_order" %>
<%@ page import="com.cn.Mapper.goodsMapper.OrderMapper" %><%--
  Created by IntelliJ IDEA.
  User: yujiajing
  Date: 2022/10/3
  Time: 14:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
  <title>账单管理</title>
  <%--  引入jQuery包  --%>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>

  <!-- 引入layui css -->
  <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css" />

  <!-- 引入layui js -->
  <script src="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
  <style type="text/css">
    #CardId{
      width: 200px;
      height: 40px;
      float:left;
    }
  </style>
</head>

<body>

<script>
/*  function OperatorUser(id) {

    $.ajax({

      type : "post",

      url : "employee/delete",

      dateType : "String",

      data : {

        id : id

      },

      success : function(data) {
        alert("删除成功");
        $("#tr_"+id).remove();


      },

      error : function() {
        alert("失败");

        $("#tr_"+id).remove();

      }

    });

  }*/
</script>

<%
  SqlSession sqlSession = SqlsesstionUtil.getSqlSession();
OrderMapper orderMapper=sqlSession.getMapper(OrderMapper.class);
  List<Goods_order> goods_ordersList= orderMapper.showAll();
%>
<table id="UserTable" class="layui-table"  >

  <tr>
    <td>订单号</td>
    <td>操作员</td>
    <td>是否会员</td>
    <td >总花费</td>
    <td>产生时间</td>
  </tr>

  <%for (Goods_order goods_order:goods_ordersList){%>
  <%--  --%>
  <tr id="">
    <%--    --%>
       <td><%=goods_order.getOrder_id()%></td>
       <<td><%=goods_order.getOrder_operator()%></td>
       <td><%=goods_order.isVip()%></td>
       <td><%=goods_order.getTotal_cost()%></td>
       <td><%=goods_order.getDate()%></td>

    <td>
      <%--            <a class="layui-btn layui-btn-xs" lay-event="edit" href="UpdateUser.jsp?id=<%=user.getId()%>&username=<%=user.getUsername()%>&password=<%=user.getPassword()%>">编辑</a>--%>
<%--      <a class="layui-btn layui-btn-danger layui-btn-xs"  href="javascript:void(0);)">删除</a>--%>
    </td>
    <%}%>
  </tr >
</table>

<%--查询模块--%>
<div>
  <form action="" method="post">
    <button class="layui-btn layui-btn-normal" type="submit">查询订单</button>
    <input type="text" id="CardId" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">

  </form>
</div>
<%--查询模块--%>
</body>
</html>

